package com.yyl.web.controller;

import com.alibaba.fastjson2.JSONObject;
import com.yyl.service.impl.cargoServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class cargoController {

	@Autowired
	cargoServiceImpl foo;

	@RequestMapping("getCargoList")
	public String getCargoList() {
		JSONObject json = new JSONObject();
		json.put("cargoList", foo.findAllCargo());
		return json.toString();
	}
}
